:root {
  /* Pikachu Volleyball's original width: 432px, original height: 304px */
  --aspect-ratio: calc(432 / 304);
  --inverse-aspect-ratio: calc(304 / 432);
  --canvas-width: 96vmin;
  --canvas-height: calc(96vmin * var(--inverse-aspect-ratio));
  --font-size: 18px;
  --btn-width: min(
    calc(5 * var(--font-size)),
    calc((var(--canvas-width) - 30px) / 4)
  );
  --btn-height: calc(3 * var(--font-size));
}
:root {
  --background-color: #ffffff;
  --background-color-with-alpha: rgba(255, 255, 255, 0.8);
  --color: #232629;
  --link-color: #0074cc;
  --link-hover-color: #0a95ff;
  --btn-color: #ffffff;
  --btn-background-color: rgba(50, 50, 50, 1);
  --btn-in-dropdown-background-color: rgba(100, 100, 100, 0.9);
  --btn-in-dropdown-hover-background-color: rgba(50, 50, 50, 0.9);
  --button-disabled-background-color: #cccccc;
  --update-fade-in-box-background-color: rgba(226, 230, 36, 0.85);
  --amount-to-invert-image: 0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #202124;
    --background-color-with-alpha: rgba(32, 33, 36, 0.9);
    --color: #bdc1c6;
    --link-color: #33a7ff;
    --link-hover-color: #3dc8ff;
    --btn-color: #151515;
    --btn-background-color: rgba(232, 232, 232, 1);
    --btn-in-dropdown-background-color: rgba(200, 200, 200, 0.8);
    --btn-in-dropdown-hover-background-color: rgba(232, 232, 232, 0.8);
    --button-disabled-background-color: #666666;
    --update-fade-in-box-background-color: rgba(195, 197, 48, 0.85);
    --amount-to-invert-image: 0.95;
  }
}
/* Copy of the variables in :root above */
:root[data-color-scheme='light'] {
  --background-color: #ffffff;
  --background-color-with-alpha: rgba(255, 255, 255, 0.8);
  --color: #232629;
  --link-color: #0074cc;
  --link-hover-color: #0a95ff;
  --btn-color: #ffffff;
  --btn-background-color: rgba(50, 50, 50, 1);
  --btn-in-dropdown-background-color: rgba(100, 100, 100, 0.9);
  --btn-in-dropdown-hover-background-color: rgba(50, 50, 50, 0.9);
  --button-disabled-background-color: #cccccc;
  --update-fade-in-box-background-color: rgba(226, 230, 36, 0.85);
  --amount-to-invert-image: 0;
}
/* Copy of the variables in @media (prefers-color-scheme: dark) :root above */
:root[data-color-scheme='dark'] {
  --background-color: #202124;
  --background-color-with-alpha: rgba(32, 33, 36, 0.9);
  --color: #bdc1c6;
  --link-color: #33a7ff;
  --link-hover-color: #3dc8ff;
  --btn-color: #151515;
  --btn-background-color: rgba(232, 232, 232, 1);
  --btn-in-dropdown-background-color: rgba(200, 200, 200, 0.8);
  --btn-in-dropdown-hover-background-color: rgba(232, 232, 232, 0.8);
  --button-disabled-background-color: #666666;
  --update-fade-in-box-background-color: rgba(195, 197, 48, 0.85);
  --amount-to-invert-image: 0.95;
}
/* size of iPad screen is 768px x 1024px in portrait mode */
@media only screen and (min-width: 768px) and (min-height: 768px) {
  :root {
    --font-size: 22px;
    --btn-width: min(
      calc(6 * var(--font-size)),
      calc((var(--canvas-width) - 30px) / 4)
    );
  }
}
@media only screen and (min-aspect-ratio: 432/304) {
  :root {
    --canvas-height: calc(96vh - var(--btn-height) - 10px);
    --canvas-width: calc(var(--canvas-height) * var(--aspect-ratio));
  }
}
@media only screen and (max-aspect-ratio: 432/304) {
  :root {
    --canvas-width: 96vw;
    --canvas-height: calc(96vw * var(--inverse-aspect-ratio));
  }
}
html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
* {
  font-family: Arial, Helvetica, sans-serif;
}
body {
  background-color: var(--background-color);
  color: var(--color);
  margin: 0;
}
a,
a:link,
a:visited {
  color: var(--link-color);
  text-decoration: none;
}
a:hover,
a:active {
  color: var(--link-hover-color);
}
#flex-container,
#update-history-container {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  width: var(--canvas-width);
  height: 100vh;
  margin-left: auto;
  margin-right: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}
#update-history-container {
  justify-content: center;
  align-items: stretch;
  height: auto;
  font-size: var(--font-size);
  padding-left: var(--font-size);
  padding-right: var(--font-size);
  overflow: visible;
  text-align: left;
}
#menu-bar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: var(--canvas-width);
  height: var(--btn-height);
  margin-bottom: 10px;
}
.btn-container {
  display: flex;
  align-items: center;
}
.btn-container.left {
  justify-content: flex-start;
}
.btn-container.right {
  justify-content: flex-end;
}
.btn {
  display: inline-block;
  width: var(--btn-width);
  height: var(--btn-height);
  border: none;
  border-radius: 10px;
  padding: 0;
  color: var(--btn-color);
  background-color: var(--btn-background-color);
  font-size: var(--font-size);
  text-align: center;
  text-decoration: none;
  margin-left: 5px;
  margin-right: 5px;
}
#game-dropdown-btn {
  margin-left: 0;
}
#about-btn {
  margin-right: 0;
}
.relative-container {
  position: relative;
}
.dropdown,
.submenu {
  position: absolute;
  display: none;
  z-index: 1;
}
.dropdown.show {
  display: block;
}
.submenu.show {
  display: inline-block;
}
.dropdown .btn {
  margin-right: 0;
  background-color: var(--btn-in-dropdown-background-color);
}
.submenu > .btn {
  width: calc(1.4 * var(--btn-width));
  margin-left: 0;
}
.dropdown .btn:hover,
.submenu-btn.open {
  background-color: var(--btn-in-dropdown-hover-background-color);
}
span.check {
  display: none;
}
.selected > span.check {
  display: inline;
}
#game-canvas-container {
  position: relative;
}
#game-canvas {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: var(--canvas-width);
  height: var(--canvas-height);
  image-rendering: pixelated;
}
.fade-in-box {
  position: absolute;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  top: 0;
  left: 0;
  width: var(--canvas-width);
  height: var(--canvas-height);
  font-size: var(--font-size);
  padding-left: var(--font-size);
  padding-right: var(--font-size);
  text-align: center;
  z-index: 10;
  visibility: visible;
  opacity: 1;
  background-color: var(--background-color-with-alpha);
  animation-name: fade-in;
  animation-duration: 1s;
}
.fade-in-box.about {
  justify-content: flex-start;
  height: auto;
  overflow: visible;
  text-align: left;
}
.fade-in-box.loading {
  background-color: transparent;
  color: #eeeeee;
  animation-duration: 0.5s;
}
.fade-in-box.update {
  background-color: var(--update-fade-in-box-background-color);
  color: #232629;
}
@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.fade-in-box.hidden,
.if-embedded-in-other-website.hidden,
#menu-bar.hidden,
span.hidden {
  display: none;
}
#about-box-head {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
  font-size: var(--font-size);
  text-align: center;
  visibility: visible;
  overflow: visible;
}
button.btn-in-box {
  display: block;
  height: calc(2 * var(--font-size));
  width: calc(5 * var(--font-size));
  border: none;
  margin: 0 auto;
  padding: 0;
  background-color: var(--btn-background-color);
  color: var(--btn-color);
  font-size: var(--font-size);
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
}
h1 {
  font-size: calc(1.5 * var(--font-size));
}
p.languages,
p.small,
p.p2p-online-version,
p.original-by,
p.reverse-engineered-by,
p.source-code-on,
p.release-date,
p.update-history-on {
  font-size: 0.8em;
  line-height: 150%;
}
p.release-date {
  margin-block-end: 0;
}
p.update-history-on {
  margin-block-start: 0;
  margin-block-end: 0;
}
span.no-wrap {
  white-space: nowrap;
}
span.bold {
  font-weight: bold;
}
span.thick {
  font-weight: 900;
}
div.align-center-horizontally {
  display: flex;
  flex-direction: column;
  align-items: center;
}
img.screenshot,
img.controls {
  height: auto;
  width: 100%;
}
img.screenshot {
  max-width: 864px;
}
img.controls {
  max-width: 960px;
  filter: invert(var(--amount-to-invert-image));
}
#progress-bar-border {
  position: relative;
  border: solid;
  border-color: #eeeeee;
  height: var(--btn-height);
  width: calc(var(--canvas-width) / 2);
}
#progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  /*width: width is set on style property of progress-bar element;*/
  height: 100%;
  background-color: #eeeeee;
}
button.update {
  display: inline-block;
  height: calc(3 * var(--font-size));
  width: 100%;
  border: none;
  margin: 2px;
  padding: 0;
  background-color: #eeeeee;
  color: #232629;
  font-size: var(--font-size);
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
}
@media (hover: hover) {
  button.update {
    opacity: 0.9;
  }
  button.update:hover {
    opacity: 1;
  }
}
button:disabled {
  background-color: var(--button-disabled-background-color);
}
div.for-margin {
  display: block;
  height: 50vh;
}
div.margin-top,
p.margin-top {
  margin-top: calc(2.25 * var(--font-size));
}
div.limit-width {
  max-width: 864px;
  margin-left: auto;
  margin-right: auto;
}
#update-history-container h1 {
  font-size: calc(1.5 * var(--font-size));
}
div.indent-minus {
  text-indent: calc(-5.4 * var(--font-size));
  margin-left: calc(5.4 * var(--font-size));
}
#flex-container.embedded-in-other-website {
  justify-content: flex-start;
}
.if-embedded-in-other-website {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: calc(var(--font-size) - 10px);
  font-size: calc(0.8 * var(--font-size));
  margin-bottom: var(--font-size);
  padding: var(--font-size);
  border: 3px solid;
  border-radius: 10px;
}
.if-embedded-in-other-website .limit-width {
  max-width: calc(23 * var(--font-size));
}
.if-embedded-in-other-website button {
  margin-top: var(--font-size);
  background-color: var(--background-color);
  color: var(--color);
  font-size: calc(0.8 * var(--font-size));
  border: 3px solid;
  height: calc(1.6 * var(--font-size));
  width: calc(4 * var(--font-size));
}
.original-address {
  margin-top: var(--font-size);
}
button.glow {
  box-shadow: 0 0 5px calc(var(--font-size) / 6) #52aaff;
  animation-name: blinking-glow;
  animation-duration: 0.5s;
  animation-direction: alternate;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
@keyframes blinking-glow {
  0% {
    box-shadow: 0 0 5px calc(var(--font-size) / 6) #52aaff;
  }
  100% {
    box-shadow: 0 0 5px calc(1.5 * var(--font-size) / 6) #52aaff;
  }
}
div.color-scheme-toggle-switch-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--btn-width);
  height: var(--btn-height);
  --toggle-switch-height: calc(1.6 * var(--font-size));
  --toggle-ball-diameter: calc(1.2 * var(--font-size));
  --toggle-switch-width: calc(2 * var(--toggle-switch-height));
  --toggle-ball-top: calc(
    (var(--toggle-switch-height) - var(--toggle-ball-diameter)) / 2
  );
  --toggle-ball-left: calc(
    (var(--toggle-switch-height) - var(--toggle-ball-diameter)) / 2
  );
  --toggle-ball-left-toggled: calc(
    var(--toggle-switch-width) - var(--toggle-ball-diameter) -
      var(--toggle-ball-left)
  );
}
/*
 * Toggle switch using CSS
 * Reference: https://dev.to/karankmr/how-to-create-a-custom-toggle-switch-using-css-4pmi
 */
input.toggle-switch {
  display: none;
}
input.toggle-switch + label {
  display: inline-block;
  position: relative;
  margin: auto;
  background-color: var(--btn-background-color);
  height: var(--toggle-switch-height);
  width: var(--toggle-switch-width);
  border-radius: calc(var(--toggle-switch-height) / 2);
  cursor: pointer;
  transition: background-color 1s;
}
input.toggle-switch + label::after {
  content: '';
  position: absolute;
  left: var(--toggle-ball-left);
  top: var(--toggle-ball-top);
  height: var(--toggle-ball-diameter);
  width: var(--toggle-ball-diameter);
  border-radius: 50%;
  background-color: var(--btn-color);
  transition: left 0.5s, background-color 1s;
}
input.toggle-switch:checked + label::after {
  left: var(--toggle-ball-left-toggled);
}
/*
 * The following supplement is for displaying the Sun and Moon unicode characters
 * inside toggle switch label.
 */
input.toggle-switch + label::before {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  color: var(--btn-color);
  left: var(--toggle-ball-left-toggled);
  top: var(--toggle-ball-top);
  height: var(--toggle-ball-diameter);
  width: var(--toggle-ball-diameter);
  font-size: var(--toggle-ball-diameter);
  content: '\2600';
}
input.toggle-switch:checked + label::before {
  left: var(--toggle-ball-left);
  content: '\263E';
}
